<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: rgb(240, 185, 185);
            transform: translateX(0);
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <script>
        const boxEle = document.getElementsByClassName('box')[0]
        let x=0
        // setInterval(function(){
        //     x++
        //     boxEle.style.transform = `translateX(${x}px)`
        // },20)
    </script>
</body>
</html>